import {Component, OnInit} from '@angular/core';

@Component({
  selector: 'app-home',
  templateUrl: './home.component.html',
  styleUrls: ['./home.component.css']
})
export class HomeComponent implements OnInit {

  isLogin: boolean;

  constructor() {
    this.isLogin = this.checkIsLogin();
  }

  ngOnInit(): void {
  }

  checkIsLogin(): boolean {
    if (localStorage.getItem('token') == null) {
      return false;
    } else {
      return true;
    }
  }
}
